const mongoose = require('mongoose');
const ActivtiesSchema = mongoose.Schema({
    title: String, //活动标题
    status: {
        type: Number,
        default: 0, //0进行中  1已过期   2已取消
    }, //活动状态
    describe: String, //活动详情
    phone: String, //联系电话
    requirement: String, //服务要求
    area: String, //活动地点
    type: String, //活动类型
    publisher: '', //发布人
    contector: String, //负责人
    starttime: Date, //活动开始时间
    endtime: Date, ////活动结束时间
    address: String, //详细地址
    pic: {
        type: String,
        default: ''
    }, //图片地址
    uploadtime: { //发布时间
        type: Date,
        default: Date.now()
    },
    signlist: [{
        username: {
            type: String
        },
        status: {
            type: Number, //0待定  1通过  2拒绝
            default: 0
        },
        sign:{
            signTime:{type:String},
            status:{type:Number,default:0}//0未签到 1签到 2签退
        }
    }]
}, {
    versionKey: false
});


module.exports = ActivtiesSchema;